package com.eascs.fp.applyLoan.dao;

import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.eascs.app.dao.JdbcSession;
import com.eascs.fp.common.dao.BaseDao;
import com.eascs.fp.common.entity.ApplyLoanEntity;
import com.eascs.fp.common.entity.ApplyStoreEntity;

@Repository
public class ApplyLoanDao extends BaseDao{
	
	@Autowired
	@Qualifier("wxSession")
	protected JdbcSession wxSession;


	public ApplyLoanEntity insertApplyLoanEntity(ApplyLoanEntity entity) {
		entity.setCreateTime(new Date());
		int result = wxSession.insert(entity);
		if (result > 0) {
			return entity;
		}
		return null;
	}
	
	public ApplyStoreEntity insertApplyStoreEntity(ApplyStoreEntity entity) {
		int result = wxSession.insert(entity);
		if (result > 0) {
			return entity;
		}
		return null;
	}
}
